{extend name="index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">爱心苑详情</div>
    <div class="layui-card-body">
        <form class="layui-form form-horizontal" action="" method="post">
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input value="{$data.realname}" disabled class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">工作单位</label>
                <div class="layui-input-inline">
                    <input value="{$data.danwei}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">入党时间</label>
                <div class="layui-input-inline"">
                    <input value="{$data.rudang_date}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">工作单位</label>
                <div class="layui-input-inline">
                    <input value="{$data.danwei}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-inline">
                    <input value="{$data.sex}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">联系电话</label>
                <div class="layui-input-inline">
                    <input value="{$data.mobile}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">申请渠道</label>
                <div class="layui-input-inline">
                    <input value="{$data.channel}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">需求</label>
                <div class="layui-input-inline">
                    <input value="{$data.need_type}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">申请详情</label>
                <div class="layui-input-inline">
                    <input value="{$data.info}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">心愿项目</label>
                <div class="layui-input-inline">
                    <textarea class="layui-input" disabled>{$data.wish_info}</textarea>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-inline">
                    <input value="{$data.status}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">申请时间</label>
                <div class="layui-input-inline">
                    <input value="{$data.create_time}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">申请类型</label>
                <div class="layui-input-inline">
                    <input value="{$data.type}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人联系方式</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_mobile}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人姓名</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_name}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人单位</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_danwei}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人性别</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_sex}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人出生日期</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_bron}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人联系方式</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_mobile}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人政治面貌</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_political}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助人政治面貌详情</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_political_info}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">帮助信息</label>
                <div class="layui-input-inline">
                    <input value="{$data.help_info}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">申请时间</label>
                <div class="layui-input-inline">
                    <input value="{$data.create_time}" class="layui-input" disabled>
                </div>
            </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">审核人</label>
                <div class="layui-input-inline">
                    <input value="{$data.exame_user}" class="layui-input" disabled>
                </div>
            </div>
        <div class="layui-form-item" style="margin-top: 20px;">
            <label class="layui-form-label">认领时间</label>
            <div class="layui-input-inline">
                <input value="{$data.take_time}" class="layui-input" disabled>
            </div>
        </div>
            <div class="layui-form-item" style="margin-top: 20px;">
                <label class="layui-form-label">审核时间</label>
                <div class="layui-input-inline">
                    <input value="{$data.exame_time}" class="layui-input" disabled>
                </div>
            </div>

        </form>
        <div class="layui-form-item" style="margin-left: 100px;">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal" onClick="javascript :history.back(-1);">返回</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__STATIC__/admin/js/common.js"></script>
<script type="text/javascript">
    layui.use(['layer','layedit','upload','form'], function() {
        var $ = layui.jquery;
        var form = layui.form;
        var layer = layui.layer;
        var upload = layui.upload;
        var layedit = layui.layedit;
        var index = layedit.build('demo'); //建立编辑器

        //自定义验证规则
        form.verify({
            content: function (value) {
                return layedit.sync(index);
            }
        });

        //图片1上传
        var uploadInst = upload.render({
            elem: '#test1'
            ,url: '/admin/work/uploads'
            ,data:{'type':'work'}
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo1').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                console.log(res);
                if(res.info == 1){
                    $('#img1').val(res.savename);
                }else{
                    return layer.msg('上传失败');
                }
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });

        //图片2上传
        var uploadInst2 = upload.render({
            elem: '#test2'
            ,url: '/admin/work/uploads'
            ,data:{'type':'work'}
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo2').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                console.log(res);
                if(res.info == 1){
                    $('#img2').val(res.savename);
                }else{
                    return layer.msg('上传失败');
                }
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText2 = $('#demoText2');
                demoText2.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText2.find('.demo-reload').on('click', function(){
                    uploadInst2.upload();
                });
            }
        });

        //图片3上传
        var uploadInst3 = upload.render({
            elem: '#test3'
            ,url: '/admin/work/uploads'
            ,data:{'type':'work'}
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo3').attr('src', result); //图片链接（base64）
                });
            }
            ,done: function(res){
                //如果上传失败
                console.log(res);
                if(res.info == 1){
                    $('#img3').val(res.savename);
                }else{
                    return layer.msg('上传失败');
                }
                //上传成功
            }
            ,error: function(){
                //演示失败状态，并实现重传
                var demoText3 = $('#demoText3');
                demoText3.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText3.find('.demo-reload').on('click', function(){
                    uploadInst3.upload();
                });
            }
        });


    });
</script>
{/block}